package com.javasoft.controller.ZSW;

import com.javasoft.service.ZSW.PersonalExamAnalysisService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/analysis")
public class PersonalExamAnalysisController {

    @Resource
    private PersonalExamAnalysisService personalExamAnalysisService;

    // 根据学生ID和考试ID获取总分的接口
    @GetMapping("/total-score")
    public String getTotalScore(@RequestParam("studentId") Integer studentId, @RequestParam("examId") Integer examId) {
        return personalExamAnalysisService.analysis(studentId, examId);
    }
}
